If-else 2Programming in Java Script

1.An eletronic shop has announced the following seasonal discount on the purchase of certain items.

Purchase Amount Discount on Laptop Discount on Desktop
0 - 2500 0.0% 5.0%
2501 - 5700 5.0% 7.5%
5701 - 10000 7.5% 10.0%
More than 10000 10.0% 15.0%
Write a program based on the above criteria, to input name, address , amount of purchase and the type of purchsed (L for Laptop and D for Desktop) by a customer. Compute and print the net amount to be paid by the customer along with his name and address.
2.Using a switch statement, Write a menu driven program to convert a given temperature from Fahrenheit to Celsius and vice verse. For an incorrect choice, an appropriate error message should be displayed.
3.A cloth showroom has announced the following festivel discount on the purchase of items, based on the total cost of the items purchased:
Total cost Discount (%)
Less than Rs. 2000 5%
Rs.2001 to Rs.5000 25%
Rs.5001 to Rs.10000 35%
Above Rs.10000 50%
Write a program the total cost and to compute and display the amount to be paid by the customer after availling the discount.

4.An electricity board charges the bill depending ob the number of units consumed as follows:
Units Charge
First 100 units 40 p per unit
Next 200 units 60 p per unit
Above 200 units Rs. 1 per unit

5.Write a program that returns the commission in Rs for a salesman:
The commission is based on the following conditions
Sales Commission
Less than Rs 5000 5%
Rs. 5000 to Rs 10000 8%
Above Rs. 10000 10%

6. Write a program to accept a student's name, his marks in three subjects and print his result sheet in the follwoing format:
NAME ENGLISH COMPUTER MATH TOTAL GRADE
XXXXX XXXXXX XXXXXX XXXX XXXXXX XXXXX
Assign grade to the student based on the following grade scale:
Percent less than 50 .... D
Percent Greater than 50 but less than 60.... C
Percent Greater than 60 but less than 80.... B
Percent Greater than 80 .... A

7.Write a program to compute the amount that a customer pays for the taxi that he hires based o the following conditions:
Kms travelled Amount per km
Upto less pr equal to 1 km 25
More than 1 to 6 km 10
More than 6 to 12 km 15
More than 12 to 18 Km 20

8.A cloth showroom has announced the following festivel disocunt on purchase of items:
Amount of purchase Mill Cloth Disocunt(%) Handloom Disocunt(%)
Less than Rs.1000 2% 5%
Rs.1000 to Rs.5000 20% 25%
Rs.5001 to Rs.10000 40% 50%
Above 10000 50% 60%
Write a program compute the net amount paid by the customer. assume all required values to be inputted by the user. make use of if and switch structure.

9.An employee to pay an income tax based on his gross annual income as follows:
Annual gross income Annual tax deduction %
Less than or equal to Rs 10000 0%
10001 to 50000 Rs. 1000 + 10% of income
50001 to 80000 Rs. 5000 + 20% of income
Greater than 80000 Rs. 10000 + 30% of income
Write a program and print the tax payable by a salaried person.

10.Write a program to accept the member_ID, member_name, book_name and compute the fine for member. the fine is calculated depending on the number of days a book is returned late:
Days Fine per day in Rupees
First 10 Days Rs.1
First 10 Days Rs.5
Later than 20 Days Rs.8